
<div *ngIf="author">
    <h2><span jhiTranslate="greatBigExampleApplicationApp.author.detail.title">Author</span> {{author.id}}</h2>
    <hr>
    <jhi-alert-error></jhi-alert-error>
    <dl class="row-md jh-entity-details">
        <dt><span jhiTranslate="greatBigExampleApplicationApp.author.bio">Bio</span></dt>
        <dd>
            <span>{{author.bio}}</span>
        </dd>
        <dt><span jhiTranslate="greatBigExampleApplicationApp.author.user">User</span></dt>
        <dd>
            {{author.user?.login}}
        </dd>
        <dt><span jhiTranslate="greatBigExampleApplicationApp.author.follower">Follower</span></dt>
        <dd>
            <span *ngFor="let follower of author.followers; let last = last">
                <a [routerLink]="['/author', follower?.id ]">{{follower.id}}</a>{{last ? '' : ', '}}
            </span>
        </dd>
        <dt><span jhiTranslate="greatBigExampleApplicationApp.author.favorite">Favorite</span></dt>
        <dd>
            <span *ngFor="let favorite of author.favorites; let last = last">
                <a [routerLink]="['/article', favorite?.id ]">{{favorite.id}}</a>{{last ? '' : ', '}}
            </span>
        </dd>
    </dl>

    <button type="submit"
            (click)="previousState()"
            class="btn btn-info">
        <span class="fa fa-arrow-left"></span>&nbsp;<span jhiTranslate="entity.action.back"> Back</span>
    </button>

    <button type="button"
            [routerLink]="['/', { outlets: { popup: 'author/'+ author.id + '/edit'} }]"
            replaceUrl="true"
            class="btn btn-primary">
        <span class="fa fa-pencil"></span>&nbsp;<span jhiTranslate="entity.action.edit"> Edit</span>
    </button>
</div>
